﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL.Service;
using DAL.Service.Impl;

namespace BIZ
{
    public class BaseOperation
    {
        IAdminOperationLogService logService = new AdminOperationLogServiceImpl();

        /// <summary>
        /// 写操作日志
        /// </summary>
        /// <param name="user"></param>
        /// <param name="table"></param>
        /// <param name="resouceId"></param>
        /// <param name="action"></param>
        public void WriteOperationLog(int user,string table,int resouceId,string action)
        {
            DomainModel.AdminOperationLog log = new DomainModel.AdminOperationLog()
            {
                ol_user = user,
                ol_time = DateTime.Now,
                ol_table = table,
                ol_resouceId = resouceId,
                ol_action = action
            };
            logService.save(log);
        }

    }
}
